<script setup lang='ts'>
import { ref } from 'vue';

const msg = ref('我是子组件')
const showAlert = () => {
    alert('666888')
}

defineExpose({
    msg,
    showAlert
})
</script>

<template>
    <div>测试组件</div>
    <div>{{ msg }}</div>
</template>

<style scoped></style>